package com.zynn.service.module.calculate.controller;

import com.zynn.common.core.base.BaseController;
import com.zynn.common.core.utils.ThreadPoolManager;
import com.zynn.common.pojo.result.Result;
import com.zynn.common.pojo.result.ResultUtil;
import com.zynn.service.module.calculate.service.InitVersionV3FriendsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author jerry-liqi
 *
 * 初始化加载推荐数据
 */
@Slf4j
@RestController
@Validated
@RequestMapping("init/data")
public class InitDataController extends BaseController {

    @Autowired
    private InitVersionV3FriendsService initVersionV3FriendsService;

    @RequestMapping(value = "/friend/v3", method = RequestMethod.POST)
    public Result initFriendV3(@RequestParam("userId") Long userId) {
        initVersionV3FriendsService.initFriendV3(userId);
        return ResultUtil.success();
    }
}
